<template>
	<view class="body">
	    <!-- 列表 -->
		<view style="width: 98%;height: 90%;margin: 14rpx auto;overflow: auto;padding-bottom: 30rpx;background-color: white;border-radius: 10rpx;">
			<view style="width: 100%;background-color: white;padding: 20rpx 14rpx 0 ;margin-bottom: 10rpx;">
				
				<view style="width: 100%;">
					<view class="common-list-a">
								
						<label class="common-list-b"  style="width: 30%;">物料编码 :</label>
						
						<text class="common-list-c" style="height: auto;" type="text" :selectable="true">{{titleList.categoryCode}}</text>
								
					</view>
					<view class="common-list-a">
								
						<label class="common-list-b"  style="width: 30%;">物料名称 :</label>
						
						<text class="common-list-c" style="height: auto;" type="text" :selectable="true">{{ titleList.categoryName }}</text>
								
					</view>
					<view class="common-list-a">
								
						<label class="common-list-b" style="width: 30%;">资源资产编码 :</label>
						
						<text class="common-list-c" style="height: auto;" type="text" :selectable="true">{{titleList.sourceAssetCode
}}</text>
								
					</view>
					<view class="common-list-a">
								
						<label class="common-list-b"  style="width: 30%;">标签ID :</label>
						
						<text class="common-list-c" style="height: auto;" type="text" :selectable="true">{{titleList.labelId
}}</text>
								
					</view>
					<view class="common-list-a">
								
						<label class="common-list-b"  style="width: 30%;">贴签位置 :</label>
						<text class="common-list-c" style="height: auto;" type="text" :selectable="true">{{titleList.labelLocation}}</text>
								
					</view>
					<image  :src="fileData(titleList.labelPhotoId)" :data-src="image"
									@tap="previewImage(titleList.labelPhotoId)" 
						style="width: 100%;margin-top: 10rpx;"></image>	
					
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
	data() {
		return {
			prjInfo: [],
			titleList:[],
			
		}
		}, 
		onLoad(option) {
			let item = JSON.parse(decodeURIComponent(option.item))
			this.titleList=item
			// labelPhotoId:    图片
		},
		methods: {
			previewImage: function(index) {
				
				let lister=[index];
          let current=this.fileData("1");
          let urls=lister.map((item)=>{
              return this.fileData(item);
          })
				uni.previewImage({
            current,
            urls,
				})
			},
        fileData(url){
            return (window.location.protocol + "//" + window.location.host + process.uniEnv.BASE_JM+"/pic/openUrl?httpUrl="+ url)
        },
			fanhui() {
				uni.navigateBack({
					delta: 1
				});
			},
		
		},
		}
</script>
<style>
	@import '@/common/common-ui.css';
</style>
<style scoped lang="scss">
	.collapseItem{
		border: 1px solid #E4E4E4;
		border-bottom: 0;
		margin: 6rpx 0;
		.content{
			.contentItem{
				border-top: 1px solid #E4E4E4;
				padding: 20rpx 0;
				display: flex;
				.text{
					width: 30%;
					display: inline-block;
					margin-left: 5%;
				}
			}
		}
	}
	.buttonBox{
		position: fixed;
		bottom: 0;
		width: 100vw;
		display: flex;
		background-color: #FFFFFF;
	}
	.common-list-a{
		width: 100%;
		overflow: hidden;
		/* height: 45px; */
		/* line-height: 40px; */
		//font-size: 18px;
		color: #333333;
		display: flex;
		margin-bottom: 5px;
		border: 1px solid #00000010;
		.common-list-b{
			width: 22%;
			height: auto;
			padding:10rpx 0 10rpx 14rpx;
			background-color: white;
			display: flex;
			/* align-items: center; */
			justify-content: space-around;
			flex-direction: column;
			border-right: 1px solid #00000010;
		}
		.common-list-c{
			width: 78%;
        /* padding:20rpx 10rpx 20rpx 10rpx; */
        background-color: #00000008;
        height: auto;
        padding:10rpx 0 10rpx 14rpx;
        display: flex;
        justify-content: space-around;
        flex-direction: column;
      }
    }
    .photo-item {
      width: 24%;
      display: inline-block;
        padding-top: 14rpx;
      //height: 200rpx;

      /* display: flex;
      flex-direction: column; */
		position: relative;
	}
	.photo-image {
		width: 140rpx;
		height: 140rpx;
		margin:10 20px;
	}
	.photo-delete-btn {
		width: 20px;
		height: 20px;
		position: absolute;
		top: 0rpx;
		right: 34rpx;
	}
</style>